<?php
session_start(); 
require_once($_SERVER['DOCUMENT_ROOT'].'/mpd/config/config.php');


$nip = $_SESSION['NIP'];
//baca tabel biodata
$query1=mysql_query("SELECT b.NIP as NIP, b.NAMA as NAMA, b.GENDER as GENDER, b.DOB as DOB, b.POB as POB, b.HEIGHT as HEIGHT, b.WEIGHT as WEIGHT, b.AGAMA as AGAMA, b.ALAMAT as ALAMAT,
						b.KOTA as KOTA, b.TELEPON as TELEPON, b.HANDPHONE as HANDPHONE, s.NAMA_STATUS as NAMA_STATUS, b.TANGGAL_MASUK as TANGGAL_MASUK, b.TANGGAL_TETAP as TANGGAL_TETAP, b.FOTO as FOTO FROM biodata as b, status as s where b.ID_STATUS = s.ID_STATUS and b.NIP =".$nip);  

	while($row = mysql_fetch_array($query1)){
		
		$temp = array(
			'nip' => $nip,
			'nama' => $row['NAMA'],
			'gender' => $row['GENDER'],
			'dob' => $row['DOB'],
			'pob' => $row['POB'],
			'height' => $row['HEIGHT'],
			'weight' => $row['WEIGHT'],
			'agama' => $row['AGAMA'],
			'alamat' => $row['ALAMAT'],
			'kota' => $row['KOTA'],
			'telepon' => $row['TELEPON'],
			'handphone' => $row['HANDPHONE'],
			'status' => $row['NAMA_STATUS'],
			'tanggal_masuk' => $row['TANGGAL_MASUK'],
			'tanggal_tetap' => $row['TANGGAL_TETAP'],
			'foto' => $row['FOTO']
			
		);
		}
//baca tabel pendidikan
$query2=mysql_query("SELECT * FROM pendidikan where NIP =".$nip);
//baca tabel core
$query3=mysql_query("SELECT * FROM core where NIP =".$nip." ORDER BY ID_CORE DESC LIMIT 1  ");
$row3 = mysql_fetch_row($query3);
			
//baca tabel corporate
$query4=mysql_query("SELECT * FROM corporate where NIP =".$nip." ORDER BY ID_CORPORATE DESC LIMIT 1 ");
$row4 = mysql_fetch_row($query4);

//baca tabel grade
$query5=mysql_query("SELECT * FROM grade where NIP =".$nip." ORDER BY ID_GRADE DESC LIMIT 1" );
$row5 = mysql_fetch_row($query5);

$query6=mysql_query("SELECT * FROM job where NIP =".$nip." ORDER BY ID_JOB DESC LIMIT 1 ");
$row6 = mysql_fetch_row($query6);
//baca tabel training
$query7=mysql_query("SELECT * FROM training where NIP =".$nip);
//baca tabel performance history
$query8=mysql_query("SELECT * FROM performance_history where NIP =".$nip);
?>